#include"Udpserver.hpp"
#include"Comm.hpp"
#include<memory>

using namespace std;
int main(int argc,char* argv[])
{
    if(argc!=2)
    {
        cout<<"Usage:\n     ./udp_echo_server <port>"<<endl;
        return -1;
    }

    // string ip=argv[1];
    uint16_t port=stoi(argv[1]);

    //unique_ptr<UdpServer> usvr=make_unique<UdpServer>();？？？
    UdpServer* usvr=new UdpServer(port);
    usvr->Init();
    usvr->Start();
    return 0;
}